﻿<ribbon:RibbonWindow x:Class="Hopscotch.Application.Shell.ShellWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:prism="http://www.codeplex.com/prism"
        xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock"
        xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=System.Windows.Controls.Ribbon"
        xmlns:cmn="clr-namespace:Hopscotch.Presentation.Common;assembly=Hopscotch.Presentation.Common"
        xmlns:shell="clr-namespace:Hopscotch.Application.Shell"

        Icon="pack://application:,,,/Hopscotch.Presentation.Common;component/Images/cog32.png"
        Title="Hopscotch OpenOMS"
        UseLayoutRounding="True"
        ResizeMode="CanResizeWithGrip"
        Width="800" Height="600">

    <!--Fix Blury text-->
    <TextOptions.TextFormattingMode>Display</TextOptions.TextFormattingMode>

    <!-- Window Resources -->
    <ribbon:RibbonWindow.Resources>
        <LinearGradientBrush x:Key="WindowBackgroundBrush">
            <GradientStop Color="#FFE7E9EB" Offset="0" />
            <GradientStop Color="#FFC6CACF" Offset="1" />
        </LinearGradientBrush>
    </ribbon:RibbonWindow.Resources>

    <ribbon:RibbonWindow.Background>
        <StaticResource ResourceKey="WindowBackgroundBrush" />
    </ribbon:RibbonWindow.Background>

    <!-- Layout Root -->
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition x:Name="RibbonRow" Height="Auto"/>
            <RowDefinition x:Name="ClientRow" Height="*"/>
            <RowDefinition x:Name="StatusRow" Height="24"/>
        </Grid.RowDefinitions>

        <!-- Note that the application Ribbon is defined as a Prism region, so that modules can
             load their own tabs into the Ribbon. The Utility folder contains a RibbonRegionAdapter
             class that enables the Ribbon to act as a Prism region. -->

        <!-- Application Ribbon -->
        <ribbon:Ribbon x:Name="ApplicationRibbon"
                Grid.Row="0"

                Background="Transparent"
                prism:RegionManager.RegionManager="{Binding RegionManager}"
                prism:RegionManager.RegionName="{x:Static cmn:RegionNames.RibbonRegion}">

            <!--Minmize button
            <ribbon:Ribbon.HelpPaneContent>
                <ToggleButton Content="^" />
            </ribbon:Ribbon.HelpPaneContent>
            -->

            <!-- Ribbon ApplicationMenu (defined here) -->
            <ribbon:Ribbon.ApplicationMenu>
                <ribbon:RibbonApplicationMenu SmallImageSource="Images\ribbon.png">
                    <ribbon:RibbonApplicationMenuItem Header="Exit"
                                                      ImageSource="pack://application:,,,/Hopscotch.Presentation.Common;component/Images/on-off32.png"
                                                      Command="{Binding ExitCommand}"
                                                      x:Name="MenuItemExit" />
                </ribbon:RibbonApplicationMenu>
            </ribbon:Ribbon.ApplicationMenu>

            <!-- Ribbon QuickAccessToolbar  (defined here)
            <ribbon:Ribbon.QuickAccessToolBar>
                <ribbon:RibbonQuickAccessToolBar>
                    <ribbon:RibbonButton Command="{Binding NewCollection}" ToolTip="Create a new file (Ctrl+N)" SmallImageSource="Images\new.png" />
                    <ribbon:RibbonButton Command="{Binding OpenCollection}" ToolTip="Open an existing file (Ctrl+O)" SmallImageSource="Images\open.png" />
                    <ribbon:RibbonButton Command="{Binding SaveCollection}" ToolTip="Save the current file (Ctrl+S)" SmallImageSource="Images\save.png" />
                    <ribbon:RibbonButton Command="{Binding PrintNote}" ToolTip="Print the current file (Ctrl+P)" SmallImageSource="Images\print.png" />
                </ribbon:RibbonQuickAccessToolBar>
            </ribbon:Ribbon.QuickAccessToolBar>-->


            <!-- Home Tab (defined here) -->
            <ribbon:RibbonTab x:Name="HomeTab" Header="Home" KeyTip="H">
                <ribbon:RibbonGroup Header="Tools">
                    <ribbon:RibbonButton Label="New Shell"
                                         LargeImageSource="pack://application:,,,/Hopscotch.Presentation.Common;component/Images/doc_empty32.png"
                                         Command="{Binding NewShellCommand}"/>

                    <ribbon:RibbonMenuButton x:Name="ToolMenuRegion"
                                             Label="Tools"
                                             LargeImageSource="pack://application:,,,/Hopscotch.Presentation.Common;component/Images/wrench_plus32.png"
                                             ItemsSource="{Binding ToolMenuItems}">

                        <ribbon:RibbonMenuButton.ItemContainerStyle >
                            <Style TargetType="RibbonMenuItem" >
                                <Setter Property="Header" Value="{Binding Header}"/>
                                <Setter Property="ImageSource" Value="{Binding ImageUri}"/>
                                <Setter Property="Command" Value="{Binding DataContext.ShowToolCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ribbon:RibbonMenuButton}}}" />
                                <Setter Property="CommandParameter" Value="{Binding ViewType}"/>
                            </Style>
                        </ribbon:RibbonMenuButton.ItemContainerStyle>

                    </ribbon:RibbonMenuButton>

                    <ribbon:RibbonButton LargeImageSource="pack://application:,,,/Hopscotch.Presentation.Common;component/Images/cogs32.png" Label="Options" IsEnabled="False"/>
                    <ribbon:RibbonButton SmallImageSource="Images\SmallIcon.png" Label="Button S2" />
                    <ribbon:RibbonButton SmallImageSource="Images\SmallIcon.png" Label="Button S3" />
                    <ribbon:RibbonButton SmallImageSource="Images\SmallIcon.png" Label="Button S4" />

                </ribbon:RibbonGroup>

                <ribbon:RibbonGroup Header="Search" Visibility="Visible">
                    <ItemsControl x:Name="SearchRegion"
                                  prism:RegionManager.RegionManager="{Binding RegionManager}"
                                  prism:RegionManager.RegionName="SearchRegion" />
                </ribbon:RibbonGroup>

            </ribbon:RibbonTab>
        </ribbon:Ribbon>

        <xcad:DockingManager Grid.Row="1" x:Name="WorkspaceRegion"
                           prism:RegionManager.RegionManager="{Binding RegionManager}"
                           prism:RegionManager.RegionName="{x:Static cmn:RegionNames.WorkspaceRegion}">
            <xcad:LayoutRoot>
                <xcad:LayoutPanel>
                    <xcad:LayoutAnchorablePaneGroup>
                        <xcad:LayoutAnchorablePane>

                        </xcad:LayoutAnchorablePane>
                    </xcad:LayoutAnchorablePaneGroup>
                </xcad:LayoutPanel>
            </xcad:LayoutRoot>
        </xcad:DockingManager>


        <StatusBar Grid.Row="2" x:Name="statusBar" VerticalAlignment="Bottom">
            <StatusBarItem Content="Hopscotch"/>
            <StatusBarItem></StatusBarItem>
        </StatusBar>
    </Grid>

</ribbon:RibbonWindow>